package com.bosch.in.rtp1.ept.model.technical;

import java.util.Date;

import com.bosch.in.rtp1.ept.constant.QueryKeyWord;
import com.bosch.in.rtp1.ept.util.HoldCodeUtility;
import com.bosch.in.rtp1.ept.util.StringUtility;

public class Condition4ReleasedHold extends Condition4LotStatus {
	
	private String holdCodeReclassified;
	private String holdCodeReclassifiedText;
	private String holdCommentReclassified;
	private Date holdEndFrom;
	private Date holdEndTo;
	private String heldDuration = "";
	
	public String getHoldCodeReclassified() {
		return holdCodeReclassified;
	}
	public void setHoldCodeReclassified(String holdCodeReclassified) {
		this.holdCodeReclassified = holdCodeReclassified;
	}
	public String getHoldCommentReclassified() {
		return holdCommentReclassified;
	}
	public void setHoldCommentReclassified(String holdCommentReclassified) {
		this.holdCommentReclassified = holdCommentReclassified;
	}
	public Date getHoldEndFrom() {
		return holdEndFrom;
	}
	public void setHoldEndFrom(Date holdEndFrom) {
		this.holdEndFrom = holdEndFrom;
	}
	public Date getHoldEndTo() {
		return holdEndTo;
	}
	public void setHoldEndTo(Date holdEndTo) {
		this.holdEndTo = holdEndTo;
	}
	public String getHoldCodeReclassifiedText() {
		return holdCodeReclassifiedText;
	}
	public void setHoldCodeReclassifiedText(String holdCodeReclassifiedText) {
		this.holdCodeReclassifiedText = holdCodeReclassifiedText;
	}
	
	public String getHoldReclasText_Codes() {
		String txtCodes = holdCodeReclassifiedText;
		if (holdCodeReclassifiedText == null || holdCodeReclassifiedText.equals("")) {
			txtCodes = StringUtility.convertToSelectAllIfNull(holdCodeReclassified);
		} else if(!holdCodeReclassifiedText.equals(HoldCodeUtility.CLUSTER) 
				&& !holdCodeReclassifiedText.equals(HoldCodeUtility.REST)
				&& holdCodeReclassified != null && !holdCodeReclassified.equals("")) {
			txtCodes += QueryKeyWord.BLANK + QueryKeyWord.OPEN + holdCodeReclassified + QueryKeyWord.CLOSE;
		}
		
		return txtCodes;
	}
	public String getHeldDuration() {
		return heldDuration;
	}
	public void setHeldDuration(String heldDuration) {
		this.heldDuration = heldDuration;
	}
	
	
	
}
